package org.opens.mybatisplus.entity.enumObj3;

public enum EnumObj3Sex {

    MAN(1, "男"),
    WOMAN(2, "女");

    private Integer value;

    private String message;

    EnumObj3Sex(Integer value, String message) {
        this.value = value;
        this.message = message;
    }

    public static EnumObj3Sex getEnumObjByValue(Integer value) {
        for (EnumObj3Sex sex : EnumObj3Sex.values()) {
            if ( sex.getValue().equals(value) ) {
                return sex;
            }
        }
        return null;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

}
